<template>
  <el-upload
    class="wf-el-upload"
    :file-list="fileList"
    :multiple="false"
    :before-upload="beforeUpload"
    :limit="1"
  >
    <slot />
  </el-upload>
</template>

<script>
  import { mapGetters } from 'vuex';
  export default {
    props: {
      fileList: {
        type: Array,
        default() {
          return [];
        },
      },
      onUpload: {
        type: Function,
        default() {
          return () => {};
        },
      },
    },
    computed: {
      ...mapGetters('user', ['userInfo']),
      isClient() {
        return this.userInfo.isClient;
      },
    },
    methods: {
      beforeUpload(file) {
        console.log();
      },
    },
  };
</script>

<style></style>
